@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222 47% 11%;

    --card: 0 0% 100%;
    --card-foreground: 222 47% 11%;

    --popover: 0 0% 100%;
    --popover-foreground: 222 47% 11%;

    --primary: 217 89% 61%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222 47% 11%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 217 89% 61%;
    --accent-foreground: 210 40% 98%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 217 89% 61%;

    --radius: 0.5rem;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* 自定义样式 */
.blue-header {
  @apply bg-primary text-white font-medium;
}

.blue-border {
  @apply border-primary/20;
}

.blue-hover {
  @apply hover:bg-primary/5 transition-colors;
}

.blue-badge {
  @apply bg-primary/10 text-primary border-primary/20;
}

.blue-badge-solid {
  @apply bg-primary text-white;
}

.blue-tabs {
  @apply bg-primary/10;
}

.blue-tab-active {
  @apply data-[state=active]:bg-white data-[state=active]:text-primary data-[state=active]:shadow-sm;
}

.blue-card-header {
  @apply border-b border-primary/20 bg-primary/5;
}

.blue-link {
  @apply text-primary hover:text-primary/80 hover:underline transition-colors;
}

.blue-button {
  @apply text-primary hover:bg-primary/10 transition-colors;
}

/* 蓝色表头样式 */
.blue-header-table .ant-table-thead > tr > th {
  background-color: hsl(217, 89%, 61%) !important;
  color: white !important;
  font-weight: 600 !important;
  border-color: hsl(217, 89%, 51%) !important;
  padding: 16px 12px !important;
  height: 48px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
}

.blue-header-table .ant-table-thead > tr > th::before {
  display: none !important;
}

/* 统一表格行高和样式 */
.blue-header-table .ant-table-tbody > tr > td {
  padding: 16px 8px !important;
  min-height: 42px !important;
  font-size: 14px !important;
  vertical-align: middle !important;
  border-color: #f0f0f0 !important;
  text-align: center !important;
}

.blue-header-table .ant-table-tbody > tr:hover > td {
  background-color: #f5f5f5 !important;
}

/* 统一输入框样式 */
.blue-header-table .ant-input {
  padding: 4px 8px !important;
  font-size: 14px !important;
  min-height: 42px !important;
  text-align: center !important;
}

/* 禁用状态的输入框样式 */
.blue-header-table .ant-input:disabled {
  background-color: white !important;
  color: #666 !important;
  border-color: #f0f0f0 !important;
  cursor: default !important;
}

/* 表格内所有元素居中 */
.blue-header-table .editable-cell-value-wrap {
  text-align: center !important;
}

.blue-header-table .ant-form-item {
  text-align: center !important;
}

.blue-header-table .ant-form-item-control-input {
  text-align: center !important;
}

/* 统一表格边框 - 去掉外框和竖线 */
.blue-header-table .ant-table-container {
  border: none !important;
}

.blue-header-table .ant-table-cell {
  border-right: none !important;
}

.blue-header-table .ant-table-thead > tr > th {
  border-right: none !important;
}

.blue-header-table .ant-table-tbody > tr > td {
  border-right: none !important;
}

/* 编辑和保存按钮绿色主题 */
.edit-save-button {
  background-color: #10b981 !important;
  color: white !important;
  border-color: #10b981 !important;
  min-width: 80px !important;
  padding: 8px 20px !important;
}

.edit-save-button:hover {
  background-color: #059669 !important;
  border-color: #059669 !important;
}

.edit-save-button:focus {
  background-color: #059669 !important;
  border-color: #059669 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* 取消按钮也设置相同宽度保持一致 */
.cancel-button {
  min-width: 80px !important;
  padding: 8px 20px !important;
}
